# example7_1.py
# coding=utf-8
import pandas as pd

path = "stock.csv"
df = pd.read_csv(
    path,
    sep=",",
    index_col="Date",
    nrows=5,
    usecols=["Date", "Open", "High", "Low", "Close", "Volume"],
)
print(df)
df.to_csv("df存储为csv文件.csv")
